Skip to content

docs: add Notebook 1 — Inspecting a Generated World (M14)#48

Merged
shaypal5 merged 3 commits intomainfrom
m14-notebook-inspect-world
May 3, 2026
Merged

docs: add Notebook 1 — Inspecting a Generated World (M14)#48
shaypal5 merged 3 commits intomainfrom
m14-notebook-inspect-world

Conversation

@shaypal5
Copy link
Copy Markdown
Contributor

@shaypal5 shaypal5 commented May 2, 2026

Summary

  • Adds leadforge/examples/notebooks/01_inspect_world.ipynb — a Jupyter notebook that walks data scientists through generating a small bundle and exploring everything inside it.
  • Covers: bundle generation via Python API, manifest.json provenance, relational tables + FK relationships, task splits (class balance, feature distributions), dataset card, and feature dictionary.
  • Updates .agent-plan.md to mark M14 Notebook 1 as done.

Design choices

  • Uses tempfile.mkdtemp() for the bundle directory, cleaned up at the end — notebook is fully self-contained.
  • 500 leads / seed=42 / student_public / intro — small enough to run quickly, large enough to show meaningful data.
  • Committed with empty outputs for clean version control.
  • Brief teaser of research_instructor mode without generating it.

Test plan

  • pip install -e ".[dev]" then run the notebook end-to-end with jupyter nbconvert --execute
  • Verify all cells produce output and the temp directory is cleaned up
  • Confirm no generated outputs are committed (clean notebook JSON)

🤖 Generated with Claude Code

Jupyter notebook walking users through generating a small bundle
and exploring its contents: manifest, relational tables, FK
relationships, task splits, dataset card, and feature dictionary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 2, 2026 11:46
@shaypal5 shaypal5 added type: docs Documentation or narrative changes layer: recipes recipes/ recipe assets and registry labels May 2, 2026
@github-actions

This comment has been minimized.

…manifest

- Register atexit handler so temp dir is cleaned up even if the kernel
  restarts or a cell errors before the cleanup cell runs.
- Read task ID from manifest instead of hardcoding
  "converted_within_90_days" — aligns with the recently added
  primary_task configurability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

This comment has been minimized.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds the first example notebook for the leadforge bundle format, giving users a guided walkthrough of generating a small synthetic world and inspecting the bundle artifacts it produces. It fits into the codebase as end-user documentation for the public Python API and the bundle schema/layout already implemented elsewhere in the repository.

Changes:

  • Adds leadforge/examples/notebooks/01_inspect_world.ipynb, covering bundle generation, manifest inspection, relational tables, task splits, dataset card, and feature dictionary.
  • Uses a small generated bundle (n_leads=500, seed=42, student_public, intro) to keep the notebook fast and self-contained.
  • Marks M14 Notebook 1 as completed in .agent-plan.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
leadforge/examples/notebooks/01_inspect_world.ipynb New walkthrough notebook demonstrating how to generate and inspect a bundle with the Python API.
.agent-plan.md Updates roadmap status to mark Notebook 1 as done.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread leadforge/examples/notebooks/01_inspect_world.ipynb
Comment thread leadforge/examples/notebooks/01_inspect_world.ipynb Outdated
…pyter prereq

- Task manifest uses flat keys (train_rows, valid_rows) not nested
  dicts — fixed the manifest display cell to match actual schema.
- Added Jupyter install note to prerequisites markdown cell.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@shaypal5 shaypal5 merged commit d624cb1 into main May 3, 2026
7 checks passed
@shaypal5 shaypal5 deleted the m14-notebook-inspect-world branch May 3, 2026 06:23
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

pr-agent-context report:

No unresolved review comments, failing checks, or actionable patch coverage gaps were found on PR #48 in repository https://github.com/leadforge-dev/leadforge. Treat this PR as all clear unless new signals appear.

Run metadata:

Tool ref: v4
Tool version: 4.0.21
Trigger: commit pushed
Workflow run: 25271876810 attempt 1
Comment timestamp: 2026-05-03T06:23:02.717033+00:00
PR head commit: 378372290bc50f573a61fd8bcb3f8480dbf81a7d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

layer: recipes recipes/ recipe assets and registry type: docs Documentation or narrative changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants